"""author: wenyao
   data: 2021/5/17
   project: devopscmdb
"""
#抽象基类  定义了接口规范，子类必修实现抽象基类父类里的抽象方法
#抽象基类不能实例化
# from abc import ABC, abstractmethod
# class Animal(ABC):
#
#     @abstractmethod
#     def eat(self):
#         pass
#
#     def drink(self):
#         pass
#
# class Dog(Animal):
#     def eat(self):
#         print("dog is eating....")
#
# dog = Dog()
# # a = Animal()

class A:
    name = "a"
    def __init__(self):
        self.age = 18
    def eat(self):
        print("eating.....")

a1 = A()
a1.eat()   #--->A.eat(a1)
delattr(A,"eat")
print(a1.__dict__)
print(A.__dict__)
#print(__name__)